diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-01-28 18:06:53 +0000 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-01-28 18:06:53 +0000 |
| commit | ed52216fb8df3c5c6ed1561ed59699a67a950187 (patch) | |
| tree | 643debcd204e511e0842a68f6946a97a26f51814 /website/src/pages/blog/[...slug].astro | |
| parent | 17aa658fb8b86a5caf3d3608f7871e43d09be55a (diff) | |
| parent | c9f6c53a0d9617e3d3a6862b3998322c2a1470c8 (diff) | |
Merge branch 'main' of https://github.com/joeacarstairs/personal-website
Diffstat (limited to 'website/src/pages/blog/[...slug].astro')
| -rw-r--r-- | website/src/pages/blog/[...slug].astro | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/website/src/pages/blog/[...slug].astro b/website/src/pages/blog/[...slug].astro index 800c534..0754ea7 100644 --- a/website/src/pages/blog/[...slug].astro +++ b/website/src/pages/blog/[...slug].astro @@ -1,20 +1,20 @@ --- -import { type CollectionEntry, getCollection } from 'astro:content'; +import { type CollectionEntry, getCollection, render } from 'astro:content'; import BlogPost from '../../layouts/BlogPost.astro'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ - params: { slug: post.slug }, + params: { slug: post.id }, props: post, })); } type Props = CollectionEntry<'blog'>; const post = Astro.props; -const { Content } = await post.render(); +const { Content } = await render(post); --- <BlogPost {...post.data}> <Content /> -</BlogPost>
\ No newline at end of file +</BlogPost> |
